﻿using Microsoft.Practices.Unity;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Rhino.Mocks;
using TestByWire.Factories.StubbingStrategies;

namespace TestByWire.Test.Factories.StubbingStrategies
{
    [TestClass]
    public class StringStubbingStrategyTest
    {
        private StringStubbingStrategy _stringStubbingStrategy;
 
        [TestInitialize]
        public void PerTestSetup()
        {
            _stringStubbingStrategy = new StringStubbingStrategy();
        }

        [TestMethod]
        public void RegisterOnContainerMustReturnFalse()
        {
            Assert.IsFalse(_stringStubbingStrategy.RegisterOnContainer);
        }

        [TestMethod]
        public void CanHandleTypeMustReturnTrueOnString()
        {
            Assert.IsTrue(_stringStubbingStrategy.CanHandleType(typeof(string), null));
        }

        [TestMethod]
        public void TryCreateInstanceMustReturnStringEmpty()
        {
            Assert.AreEqual(string.Empty, _stringStubbingStrategy.CreateInstance(typeof(string), null));
        }
    }
}
